package com.cn.xiaonuo.tcrfinance.tcragents.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.tcrfinance.tcragents.entiy.*;
import com.cn.xiaonuo.tcrfinance.tcragents.service.AgentFinanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author ＹｕＨａｏ·ｐｅｎｇ
 * @date 2021年12月15日 15:30
 */
@CrossOrigin
@RestController
public class AgentFinanceController {

    @Autowired
    AgentFinanceService agentFinanceService;

    @PostMapping("/api/agent/finance/queryRoyaltyTol")
    public BusinessMessage queryRoyaltyTol(@RequestBody Map<String,Object> map){
      return  agentFinanceService.queryRoyaltyTol(map);
    }

    @PostMapping("/api/agent/finance/queryRoyaltyShop")
    public BusinessMessage queryRoyaltyShop(@RequestBody Map<String,Object> map){
        return  agentFinanceService.queryRoyaltyShop(map);
    }

    @PostMapping("/api/agent/finance/queryUserDetails")
    public BusinessMessage queryUserDetails(@RequestBody Map<String,Object> map){
        return agentFinanceService.queryUserDetails(map);
    }

    @PostMapping("/api/agent/finance/queryRoyDetails")
    public BusinessMessage queryRoyDetails(@RequestBody Map<String,Object> map){
        return agentFinanceService.queryRoyDetails(map);
    }


    @PostMapping("/api/agent/finance/queryShopDetails")
    public BusinessMessage queryShopDetails(){ return agentFinanceService.queryShopDetails(); }

    @PostMapping("/api/agent/finance/financialTolRoy")
    public BusinessMessage financialTolRoy(SlXsAgentRoyalty roy){
        return agentFinanceService.financialTolRoy(roy);
    }


    @PostMapping("/api/agent/finance/financialRoyDetails")
    public BusinessMessage financialRoyDetails(SlXsAgentRoyalty royalty){
        return agentFinanceService.financialRoyDetails(royalty);
    }

    @PostMapping("/api/agent/finance/financialSureRoy")
    public BusinessMessage financialSureRoy(@RequestBody List<SlXsAgentRoyalty> royList){
        return agentFinanceService.financialSureRoy(royList);
    }

    @PostMapping("/api/agent/finance/financialDetailsRoy")
    public BusinessMessage financialDetailsRoy(SlXsAgentRoyalty roy){ return agentFinanceService.financialDetailsRoy(roy); }




    @PostMapping("/api/agent/finance/financialCycles")
    public BusinessMessage financialCycles(AppsCyc appsCyc){return agentFinanceService.financialCycles(appsCyc);}

    @PostMapping("/api/agent/finance/financialOpCycTrade")
    public BusinessMessage financialOpCycTrade(SlShop appsCyc){return  agentFinanceService.financialOpCycTrade(appsCyc);}


    @PostMapping("/api/agent/finance/financialSpRoyTolGb")
    public BusinessMessage financialSpRoyTolGb(AppsCyc appsCyc){return agentFinanceService.financialSpRoyTolGb(appsCyc);}

    @PostMapping("/api/agent/finance/financialAgentTotalInfo")
    public BusinessMessage financialAgentTotalInfo(CycleInfo cInfo){return agentFinanceService.financialAgentTotalInfo(cInfo);}

    @PostMapping("/api/agent/finance/financialHasRoyAgentInfo")
    public BusinessMessage financialHasRoyAgentInfo(RoyCycInfo cInfo){return agentFinanceService.financialHasRoyAgentInfo(cInfo);}

    @PostMapping("/api/agent/finance/financialCycRoyDetails")
    public BusinessMessage financialCycRoyDetails(RoyDetailInfo cInfo){return agentFinanceService.financialCycRoyDetails(cInfo);}

}


